package com.battery.system.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.battery.common.annotation.Excel;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 预付费记录对象 ws_pre_cost
 *
 * @author battery
 * @date 2021-06-20
 */
@Table(name = "ws_pre_cost")
public class PreCost {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @Id
    @KeySql(useGeneratedKeys = true)
    private Long id;

    /**
     * 租借记录ID
     */
    private String usedId;

    /**
     * 支付订单ID
     */
    private String orderId;

    /**
     * 直营项目ID,即平台ID
     */
    @Excel(name = "直营项目ID,即平台ID")
    private String projectId;

    /**
     * 直营合作商ID
     */
    @Excel(name = "直营合作商ID")
    private String partnerId;

    /**
     * 直营商户ID
     */
    @Excel(name = "直营商户ID")
    private String merchantId;

    /**
     * 直营门店ID
     */
    @Excel(name = "直营门店ID")
    private String storeId;

    /**
     * 来源
     */
    @Excel(name = "来源")
    private Integer preType;

    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    private String userAppId;

    /**
     * 訂單金額
     */
    @Excel(name = "分润金额")
    private BigDecimal shareMoney;

    /**
     * 预付费扣除金额
     */
    @Excel(name = "预付费扣除金额")
    private BigDecimal preMonery;

    /**
     * 分润比例
     */
    @Excel(name = "分润比例")
    private BigDecimal shareBrokerage;

    /**
     * 预付费扣除前金额
     */
    @Excel(name = "预付费扣除前金额")
    private BigDecimal beforeMoney;

    /**
     * 预付费扣除后金额
     */
    @Excel(name = "预付费扣除后金额")
    private BigDecimal afterMoney;

    /**
     * 设备id
     */
    private String deviceId;


    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;


    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setUsedId(String usedId) {
        this.usedId = usedId;
    }

    public String getUsedId() {
        return usedId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setPartnerId(String partnerId) {
        this.partnerId = partnerId;
    }

    public String getPartnerId() {
        return partnerId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public String getStoreId() {
        return storeId;
    }

    public void setPreType(Integer preType) {
        this.preType = preType;
    }

    public Integer getPreType() {
        return preType;
    }

    public void setUserAppId(String userAppId) {
        this.userAppId = userAppId;
    }

    public String getUserAppId() {
        return userAppId;
    }

    public void setShareMoney(BigDecimal shareMoney) {
        this.shareMoney = shareMoney;
    }

    public BigDecimal getShareMoney() {
        return shareMoney;
    }

    public void setPreMonery(BigDecimal preMonery) {
        this.preMonery = preMonery;
    }

    public BigDecimal getPreMonery() {
        return preMonery;
    }

    public BigDecimal getShareBrokerage() {
        return shareBrokerage;
    }

    public void setShareBrokerage(BigDecimal shareBrokerage) {
        this.shareBrokerage = shareBrokerage;
    }

    public void setBeforeMoney(BigDecimal beforeMoney) {
        this.beforeMoney = beforeMoney;
    }

    public BigDecimal getBeforeMoney() {
        return beforeMoney;
    }

    public void setAfterMoney(BigDecimal afterMoney) {
        this.afterMoney = afterMoney;
    }

    public BigDecimal getAfterMoney() {
        return afterMoney;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getDeviceId() {
        return deviceId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("usedId", getUsedId())
                .append("orderId", getOrderId())
                .append("projectId", getProjectId())
                .append("partnerId", getPartnerId())
                .append("merchantId", getMerchantId())
                .append("storeId", getStoreId())
                .append("preType", getPreType())
                .append("createTime", getCreateTime())
                .append("userAppId", getUserAppId())
                .append("shareMoney", getShareMoney())
                .append("preMonery", getPreMonery())
                .append("shareBrokerage", getShareBrokerage())
                .append("beforeMoney", getBeforeMoney())
                .append("afterMoney", getAfterMoney())
                .append("deviceId", getDeviceId())
                .toString();
    }
}
